<%@ page language="java" contentType="text/html; charset=utf-8"%>   
<%@ taglib prefix="s" uri="/struts-tags" %>   
<%
 String pathPrefix = request.getContextPath();
%> 
<html>
    <head>
        <title></title>         
        <script type="text/javascript"
			src="<%=request.getContextPath()%>/js/dwr/DWRActionUtil.js"></script>
			<script type="text/javascript"
			src="<%=request.getContextPath()%>/dwr/interface/DWRAction.js"></script>
			<script type="text/javascript"
			src="<%=request.getContextPath()%>/dwr/engine.js"></script>
    </head>    
    <script type="text/javascript">    	     	 
		function check(obj){
		 	DWREngine.setAsync(false);
			DWRActionUtil.execute(
				 { namespace:'/com/cattsfot/user', action:'dwr', executeResult:'false' }, 
				 {'para':obj.value},
				 callback);			
		 }  
		 function callback(data){
		    alert(data['message']);		
		}   
    </script>    
    <body >         
       Add User
		<br>
		<s:form action="userAdd" method="post" namespace="/com/cattsfot/user">
			<s:textfield name="user.username" label="Username" onchange="check(this)"></s:textfield>
			<s:password name="user.password" label="Password"></s:password>
			<s:submit label="确定" />
		</s:form>
         
    </body>
</html>

